package com.sg.dto.biz.pbff.common;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Objects;


/**
 * @desc BffConfSchemeItemResultDto
 * @使用场景
 */
@Data
public class BffConfSchemeItemResultDto implements Serializable {

    /**
     * 选项关系ID
     */
    @NotNull(message = "选项关系ID 不能为空")
    @ApiModelProperty("选项关系ID ")
    private String confOptionRshipId;

    /**
     * 答案结果值
     */
    @NotNull(message = "答案结果值不能为空")
    @ApiModelProperty("答案结果值")
    private String endValue;

    /**
     * 答案结果类型 NUMERIC:数值 TEXT:文本 DATETIME:日期 TIME:时间
     */
    @ApiModelProperty("答案结果类型")
    private String resultType;

    /**
     * 答案选项类型 RADIO:单选型 MULTIPLE:多选型 TEXT:填空型
     */
    @NotNull(message = "答案选项类型不能为空")
    @ApiModelProperty("答案选项类型")
    private String optionType;

    /**
     * 选项标识
     */
    @NotNull(message = "选项标识不能为空")
    @ApiModelProperty("选项标识")
    private String confOptionCode;

    /**
     * 选项名称
     */
    @NotNull(message = "选项名称不能为空")
    @ApiModelProperty("选项名称")
    private String confOptionName;

    /**
     * 选项排序
     */
    @NotNull(message = "选项排序不能为空")
    @ApiModelProperty("选项排序")
    private Long confOptionSortNum;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        BffConfSchemeItemResultDto that = (BffConfSchemeItemResultDto) o;
        return confOptionRshipId == that.confOptionRshipId && endValue == that.endValue && resultType == that.resultType && optionType == that.optionType && confOptionCode == that.confOptionCode && confOptionName == that.confOptionName && confOptionSortNum == that.confOptionSortNum;
    }

    @Override
    public int hashCode() {
        return Objects.hash(super.hashCode(), confOptionRshipId, endValue, resultType, optionType, confOptionCode, confOptionName, confOptionSortNum);
    }


}
   